#ifndef CONNECT_TRACKER_H
#define CONNECT_TRACKER_H

#include <windows.h>
#include <winhttp.h>
#include <stdio.h>
#include <tchar.h>
#include <wchar.h>
#include <memory.h>
#include <string.h>

/**
 * Connect the tracker-server.
 * @param tracker_url	[in]			the tracker_url
 * @param info_hash		[in]			the info_hash of the file
 * @param peer_id		[in]			the peer_id
 * @param peer_port		[in]			the peer_port
 * @param left			[in]			the number of bytes still has to download 
 * @param out_buffer	[out]			the tracker-server's response
 * @return value						the response's size
 */
int connect_tracker(char* tracker_url, int tracker_url_length, char* info_hash, int info_hash_length, char* peer_id, int peer_id_length, char* peer_port, int peer_port_length, char* left, int left_length, char** out_buffer);

#endif